<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

//Route::get('/', function () {
//    return view('welcome');
//});
//Route::get('/hello',function (){
//   return 'Hello World';
//});
//Route::post('basic',function (){
//    return 'basic';
//});
//Route::match(['get','post'],'match',function (){
//   return 'id为：';
//});
//Route::get('/id/{id}',function ($id){
//    return 'id:'.$id;
//});
//get请求和控制器的连接
Route::get('news/index','NewsController@index');
//post请求、match、any和控制器的连接
Route::post('news/index',['uses'=>'NewsController@index']);
//传参
Route::any('news/detail/{id}',['uses'=>'NewsController@detail'])->where('id','[0-9]+');

//Route::any('student/index',['uses'=>'StudentController@index'])->where('id','[0-9]+');
Route::any('student/index',['uses'=>'StudentController@orm1'])->where('id','[0-9]+');

//Route::group(['index'=>['index']],'IndexController@index');